package com.easywan.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.easywan.dao.ToolsFeedBackMapper;
import com.easywan.pojo.IResult;
import com.easywan.pojo.IResultSupport;
import com.easywan.service.IToolsFeedBackService;
import com.easywan.vo.ToolsFeedBack;

@Service("toolsFeedBackService")
public class ToolsFeedBackServiceImpl implements IToolsFeedBackService{
	@Autowired
	ToolsFeedBackMapper mapper;
	@Transactional
	public IResult insert(String name, String tel, String msg) {
		ToolsFeedBack toolsFeedBack = new ToolsFeedBack();
		toolsFeedBack.setName(name);
		toolsFeedBack.setTel(tel);
		toolsFeedBack.setMsg(msg);
		mapper.insert(toolsFeedBack);
		return IResultSupport.buildResult(IResult.SUCCESS_CODE, "留言成功");
	}
	
}
